package com.firefly.admin.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.firefly.admin.common.vo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;
import java.util.List;

@ApiModel(value = "FySystemNotice", description = "系统公告")
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
public class FySystemNotice extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "公告ID")
    private Long noticeId;

    @ApiModelProperty(value = "公告类型 1：系统公告 2：用户通知")
    private String noticeType;

    @ApiModelProperty(value = "优先级 1：普通 2：紧急 3：特急")
    private String priorityLevel;

    @ApiModelProperty(value = "公告标题")
    private String noticeTitle;

    @ApiModelProperty(value = "公告内容")
    private String noticeContent;

    @ApiModelProperty(value = "公告状态 1：未发布 2：发布 3:撤销")
    private String noticeStatus;

    @ApiModelProperty(value = "公告对象类型 1：全员 2：组织 3：用户")
    private String noticeObjectType;

    @ApiModelProperty(value = "发布人ID")
    private Long releaseUserId;

    @ApiModelProperty(value = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date releaseTime;

    @ApiModelProperty(value = "撤销时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date revokeTime;

    @ApiModelProperty(value = "是否阅读，默认 未读")
    @TableField(exist = false)
    private boolean alreadyRead = false;

    @ApiModelProperty(value = "发布人")
    @TableField(exist = false)
    private FySystemUser releaseUser;

    @ApiModelProperty(value = "消息接收对象")
    @TableField(exist = false)
    private List<Long> noticeObjectIds;
}
